#include<string.h>

char *largestOddNumber(char *num)
{
    int len = strlen(num);
    int index = 0;
    for (int i = len - 1; i >= 0; --i)
    {
        int digit = num[i] - '0';
        if (digit % 2 == 1)
        {
            index = i + 1;
            break;
        }
    }
    num[index] = '\0';

    return num;
}